From d888ac7db421b99a7ca96484a080bbae9cd74292 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 20 Jan 2010 20:22:20 +0000 Subject: [PATCH] Make use of config.h files optional to allow third party build tools. --- gpsbabel/Makefile.in | 2 +- gpsbabel/cet_util.h | 2 ++ gpsbabel/defs.h | 2 ++ gpsbabel/exif.c | 1 - gpsbabel/gbfile.h | 1 - gpsbabel/gbsleep.c | 2 ++ gpsbabel/jeeps/gpslibusb.c | 2 ++ gpsbabel/jeeps/gpsusbstub.c | 4 ++++ 8 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gpsbabel/Makefile.in b/gpsbabel/Makefile.in index 71ec94a6f..75e0631d2 100644 --- a/gpsbabel/Makefile.in +++ b/gpsbabel/Makefile.in @@ -35,7 +35,7 @@ OUTPUT_SWITCH=-o # #DEBUGGING=-g $(EXTRA_DEBUGGING) # add -DDEBUG_MEM to turn on memory allocation logging GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I. -I$(srcdir) \ - $(OPTIMIZATION) @CFLAGS@ + $(OPTIMIZATION) -DHAVE_CONFIG_H @CFLAGS@ LDFLAGS=$(EXTRA_LDFLAGS) @LDFLAGS@ PREFIX=@prefix@ INSTALL_DIR=$(DESTDIR)/$(PREFIX) diff --git a/gpsbabel/cet_util.h b/gpsbabel/cet_util.h index 389418157..1fc12062f 100644 --- a/gpsbabel/cet_util.h +++ b/gpsbabel/cet_util.h @@ -24,7 +24,9 @@ #include #include +#if HAVE_CONFIG_H #include "config.h" +#endif #if HAVE_LIBEXPAT # include diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 0c15fa127..24d39ce49 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -25,7 +25,9 @@ #include #include #include +#if HAVE_CONFIG_H #include "config.h" +#endif #include "queue.h" #include "gbtypes.h" #if HAVE_LIBZ diff --git a/gpsbabel/exif.c b/gpsbabel/exif.c index 105a92498..23b29497e 100644 --- a/gpsbabel/exif.c +++ b/gpsbabel/exif.c @@ -26,7 +26,6 @@ #include #include "defs.h" -#include "config.h" #include "garmin_tables.h" #include "jeeps/gpsmath.h" #include "strptime.h" diff --git a/gpsbabel/gbfile.h b/gpsbabel/gbfile.h index 639aa7bd4..432c44e6e 100644 --- a/gpsbabel/gbfile.h +++ b/gpsbabel/gbfile.h @@ -26,7 +26,6 @@ #include #include #include -#include "config.h" #include "defs.h" #include "cet.h" diff --git a/gpsbabel/gbsleep.c b/gpsbabel/gbsleep.c index a4b9ed6be..63f1fa0ba 100644 --- a/gpsbabel/gbsleep.c +++ b/gpsbabel/gbsleep.c @@ -18,7 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA */ +#if HAVE_CONFIG_H #include "config.h" +#endif #if __WIN32__ diff --git a/gpsbabel/jeeps/gpslibusb.c b/gpsbabel/jeeps/gpslibusb.c index 71710737d..579b731ce 100644 --- a/gpsbabel/jeeps/gpslibusb.c +++ b/gpsbabel/jeeps/gpslibusb.c @@ -22,7 +22,9 @@ #include #include +#if HAVE_CONFIG_H #include "config.h" +#endif #if HAVE_LIBUSB #include #include "gps.h" diff --git a/gpsbabel/jeeps/gpsusbstub.c b/gpsbabel/jeeps/gpsusbstub.c index 060bab422..0838c1b5a 100644 --- a/gpsbabel/jeeps/gpsusbstub.c +++ b/gpsbabel/jeeps/gpsusbstub.c @@ -20,8 +20,12 @@ */ +#if HAVE_CONFIG_H #include "config.h" +#endif + #include "../defs.h" + #if !HAVE_LIBUSB const char no_usb[] = "USB support is not available in this build.\n"; -- 2.30.2